import request from '@/utils/request'

export function login(username, password,restaurantId) {
  return request({
    url: '/user/login',
    method: 'post',
    data: {
      username,
      password,
      restaurantId
    }
  })
}

export function getInfo(rid) {
  return request({
    url: '/user/info',
    method: 'get',
    params: { rid }
  })
}

export function logout() {
  return request({
    url: '/user/logout',
    method: 'post'
  })
}

export function getRestaurant(params){
  return request({
    url: '/login/restList',
    method: 'post',
    data : params
  })
}
